import request from '@/utils/request'

// 查询货物备案列表
export function listParkGoodsBase(query) {
  return request({
    url: '/system/parkGoodsBase/list',
    method: 'get',
    params: query
  })
}

// 查询货物备案详细
export function getParkGoodsBase(goodsId) {
  return request({
    url: '/system/parkGoodsBase/getInfo/' + goodsId,
    method: 'get'
  })
}

// 新增货物备案
export function addParkGoodsBase(data) {
  return request({
    url: '/system/parkGoodsBase/add',
    method: 'post',
    data: data
  })
}

// 修改货物备案
export function updateParkGoodsBase(data) {
  return request({
    url: '/system/parkGoodsBase/edit',
    method: 'post',
    data: data
  })
}

// 删除货物备案
export function delParkGoodsBase(goodsId) {
  return request({
    url: '/system/parkGoodsBase/remove/' + goodsId,
    method: 'get'
  })
}

// 导出货物备案
export function exportParkGoodsBase(query) {
  return request({
    url: '/system/parkGoodsBase/export',
    method: 'get',
    params: query
  })
}

// 查询商品列表（排除节点）
export function listGoodsExcludeChild(goodsId) {
  return request({
    url: '/system/parkGoodsBase/list/exclude/' + goodsId,
    method: 'get'
  })
}

// 查询商品下拉树结构
export function treeselect() {
  return request({
    url: '/system/parkGoodsBase/treeselect',
    method: 'get'
  })
}

// 查询货物备案列表
export function selectParkGoodsList(query) {
  return request({
    url: '/system/parkGoodsBase/selectGoodsList',
    method: 'get',
    params: query
  })
}


// 下载货物导入模板
export function importTemplate() {
  return request({
    url: '/system/parkGoodsBase/importTemplate',
    method: 'get'
  })
}


// 删除货物备案
export function delParkGoodsBaseType(goodsId) {
  return request({
    url: '/system/parkGoodsBase/removeType/' + goodsId,
    method: 'get'
  })
}
